package com.peas.platform.module.icims.expenditure.kpis.adapter.repository.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.peas.platform.common.core.annotation.Comment;
import com.peas.platform.framework.mybatisplus.po.BasePo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.JdbcType;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;

// 调整单经济支出预算
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "`tbl_expenditure_adjustment_item`")
public class ExpenditureAdjustmentItemPo extends BasePo {

    // 调整单表ID
    // （指标单表）外键
    @Comment(value = "调整单表ID")
    @NotNull(message = "调整单表ID不能为空")
    @TableField(value = "`expenditure_adjustment_id`", jdbcType = JdbcType.BIGINT)
    private Long expenditureAdjustmentId;

    // 经济分类ID
    // （经济分类表）多级外键
    @Comment(value = "经济分类ID")
    @Size(max = 200, message = "经济分类ID不能超过200个字符")
    @TableField(value = "`expenditure_economic_id`", jdbcType = JdbcType.VARCHAR)
    private String expenditureEconomicId;

    // 调整前金额
    @Comment(value = "调整前金额")
    @TableField(value = "`before_amount`", jdbcType = JdbcType.DECIMAL)
    private BigDecimal beforeAmount;

    // 调整金额
    @Comment(value = "调整金额")
    @TableField(value = "`adjust_amount`", jdbcType = JdbcType.DECIMAL)
    private BigDecimal adjustAmount;

    // 调整后金额
    @Comment(value = "调整后金额")
    @TableField(value = "`after_amount`", jdbcType = JdbcType.DECIMAL)
    private BigDecimal afterAmount;

    // 调整比例
    @Comment(value = "调整比例")
    @TableField(value = "`adjust_rate`", jdbcType = JdbcType.DECIMAL)
    private BigDecimal adjustRate;

    // 浮动率
    @Comment(value = "浮动率")
    @TableField(value = "`fluctuate`", jdbcType = JdbcType.DECIMAL)
    private BigDecimal fluctuate;

    // 备注
    @Comment(value = "备注")
    @TableField(value = "`remark`", jdbcType = JdbcType.CLOB)
    private String remark;

}
